<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="__PUBLIC__/web/css/lib.css?2">
	<link rel="stylesheet" href="__PUBLIC__/web/js/morris.css">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<meta content="telephone=no" name="format-detection">
	<title>交易中心</title>
	<script src="__PUBLIC__/web/js/jquery-1.8.3.min.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/web/css/weui.min.css"/>
	<link rel="stylesheet" href="__PUBLIC__/web/css/jquery-weui.min.css">
	<link href="__PUBLIC__/web/css/font-awesome.min.css" rel="stylesheet">
	<link href="__PUBLIC__/web/fonts/iconfont.css" rel="stylesheet">
	<script src="__PUBLIC__/web/js/layer.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/web/css/style.css"/>
	<style>
        #chartNav{
		display:none;
            width: 100%;
            height: 30px;
            background: #EFEFF4;
        }
        #chartNav a{
            float: left;
            width: 100%;
            line-height: 30px;
            -ms-text-align-last: center;
            text-align-last: center;
			text-align:center;
            color: #666666;
        }
        #chartNav a:hover,#chartNav a.active{
            background: #05B6A3;
            color: #fff;
            -webkit-transform: all 0.3s;
            -moz-transform: all 0.3s;
            -ms-transform: all 0.3s;
            -o-transform: all 0.3s;
            transform: all 0.3s;
        }
		 #myhend{
            width: 100%;
            height: 40px;
            overflow: hidden;
            border-bottom:1px solid #ddd;
            color: #767676;
        }
        #myhend>div{
            float: left;
            width:calc( 50% - 10px );
            text-align: left;
            height:100%;
            line-height: 40px;
            font-size: 16px;
            font-weight: 600;
			padding-left:0;
			padding-left:10px;
        }
		 #myhend>div:last-child{
		 text-align:center;
		 color:#05B6A3;
		 font-size:24px;
		 }
        #myhend>div>p{
		   float:left;
            width: 50%;
            height: 20px;
            line-height: 20px;
            font-size: 12px;
            font-weight: 500;
        }
		#mynav{
			width:100%;
			height:30px;
			line-height:30px;
			border-bottom:1px solid #ddd;
		}
		#mynav a{
			float:left;
			width:50%;
			text-align:center;
			line-height:30px;
			color:#858585;
		}
		#mynav a:hover{
			transition:all 0.5s;
			background:#05B6A3;
			color:#fff;
		}
		#mynav a.active{
			transition:all 0.5s;
			background:#05B6A3;
			color:#fff;
		}
    </style>
</head>
<body>
	<!--顶部开始-->
	<header class="header">
		<span class="header_l"><a href="javascript:history.go(-1);"><i class="fa fa-chevron-left"></i></a></span>
		<span class="header_c">交易中心</span>
		<span style="position: absolute;right: 40px;top: 0px;text-align:center;width:70px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;font-size: 12px; ">{$userData['ue_truename']}</span>
		<span class="header_r"><a href="/index.php/Home/Index/index/"><i class="fa fa-user"></i></a></span>
	</header>
	<div class="height40"></div>
	<section class="content">
    <div class="row">
        <div class="col-md-13">
            <div class="box box-info">
                <div class="box-header with-border">
                    <!-- <h3 class="box-title" style="color: #333;/* background: #05b6a3; */ text-align: center;border-bottom: 1px solid #ddd;border-top: 1px solid #ddd;font-size: 18px;padding: 10px 0;">价格走势图</h3> -->
                </div>
				    <div id="myhend">
                    <div>
                        <p>幅:&nbsp;{$fu}%</p>
                        <p>量:&nbsp;{$liang}</p>
						 <p>最高:&nbsp;{$gao}</p>
                        <p>最低:&nbsp;{$di}</p>
                    </div>
					   <div>$:{$zuihou}</div>
                </div>
                <div id="chartNav"></div>
				<div id="mynav">
				 <a class="active">分时线</a>
				 <a>日线</a>
				</div>
				<!-- <div class="box-body chart-responsive" > -->
<!-- <div class="box-body chart-responsive" style="background-image: url('__PUBLIC__/user2/images/kx.png');"> -->
                    <div id="chart" style="width:100%;height:200px;"></div>
            </div>
        </div>
    </div>
</section>
	<!--顶部结束-->
	<!--矿车列表-->
	<div style="width: 90%;margin-left: 5%;margin-top: 20px;overflow:hidden;border-radius:5px">
		<p id="qiugou_list"onclick='showhidediv("qiugou")'style="float: left;width: 50%;text-align: center;background-color: #05B6A3;height: 30px;line-height: 30px;color:#fff;border-bottom-left-radius: 5px;border-top-left-radius: 5px">买入GEC</p>
		<p id="chushou_list" onclick='showhidediv("chushou")'style="float: left;width: 50%;text-align: center;background-color: #fff;height: 30px;line-height: 30px;border-top-right-radius: 5px;border-bottom-right-radius: 5px">卖出GEC</p>
	</div>
	<div id="qiugou" style="padding-bottom:50px;background-color:#fff;margin-top:0px;width:100%;margin-left:0%">
	<form  id="qiugou" class="mmform" style="margin-top: 25px" action="/index.php/Home/Info/myjiaoyis" method= "POST" onsubmit="return false" >
		<input type="text" name="lkb" id="gmsl" placeholder="请输入要购买数量" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
 style="width:60%"/>
		<input type="text" name="price" id="mmp" placeholder="请输入购买单价"style="width:60%" />
		
	
		<button type="submit" id="mmm" style="float:right;width:33%;margin-top:-20px;background-color: #05B6A3;height: 30px;line-height: 30px;background-color: #05B6A3;height: 30px;line-height: 30px;border-radius:5px;border:0px;color:#fff">买入</button>
	</form>
	<table class="jyzx_list" style="margin-top:20px;margin-bottom:80px;border-collapse:collapse;table-layout: fixed">
		<thead>
			<tr style="width:100%;">
				<th style="padding:10px 0">昵称</th>
				<th style="padding:10px 0">等级</th>
				<th style="padding:10px 0;width:20%">GEC</th>
				<th style="padding:10px 0;">总价($)</th>
				<th style="padding:10px 0">状态</th>
			</tr>
		</thead>
		<tbody>
		<foreach name="list" item="v">
			<tr style="margin-bottom:100px">
				<td class="name" style="padding:10px 0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;">{$v.p_name}</td>
				<td class="range iconfont" style="padding:10px 0;text-align:center;font-size:12px;">
						<if condition = "$v.p_level eq 0">未激活</if>
						<if condition = "$v.p_level eq 1">GEC矿工</if>
						<if condition = "$v.p_level eq 2">工会会长</if>
						<if condition = "$v.p_level eq 3">创业大使</if>
						<if condition = "$v.p_level eq 4">环保大使</if>
						<if condition = "$v.p_level eq 5">国际大使</if>


				</td>
				<td class="lkMoney" style="padding:10px 0;text-align:center;">{$v.lkb}</td>
				<td style="padding:10px 0;text-align:center;"><span  class="money" >{$v.jb}</span></td>
				<if condition = "$v.zt eq 0">
				<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
					<button style="background-color:#05B6A3;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" class="btnchushou">等待中</button>
				</td>
				</if>
				<if condition = "$v.zt eq 1">
				<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
					<button style="background-color:#666;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" >交易中</button>
				</td>
				</if>
				<if condition = "$v.zt eq 2">
				<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
					<button style="background-color:#05B6A3;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" class="wancheng">交易完成</button>
				</td>
				</if>
			</tr>
		</foreach>
			<!-- <tr>
				<td style="padding:10px 0;text-align:center;">三九</td>
				<td style="padding:10px 0;text-align:center;">V3</td>
				<td style="padding:10px 0;text-align:center;">100.0001</td>
				<td style="padding:10px 0;text-align:center;">100.00</td>
				<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="2"><button class="btnchushou" style="background-color:#E64340;width: 100%;height: 100% ;border: 0px;border-radius: 5px;;color: #FFFFFF;cursor: pointer;">出售</button></td>
			</tr> -->
		</tbody>
	</table>
	</div>
	<div id="chushou" style="display: none; padding-bottom:50px;background-color:#fff;" >
	<form id="qiugou" class="nnform" style="margin-top: 25px" action="/index.php/Home/Info/cslkb" method= "POST" onsubmit="return false">
		<input type="text" name="lkb" id="mcsl" placeholder="请输入要卖出数量"  onpaste="this.value=this.value.replace(/[^\d]/g,'')" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" style="width:60%"/>
		<input type="text" name="price" id="mcpic" placeholder="请输入卖出单价"style="width:60%"/>
		<if condition="$level gt 1">
		<input type="text" name="zdjy" id="mmp" placeholder="请输入指定交易的用户"style="width:60%"/>
		</if>
		<button type="submit" id="nnn" style="float:right;width:33%;margin-top:-20px;background-color: #05B6A3;height: 30px;line-height: 30px;background-color: #05B6A3;height: 30px;line-height: 30px;border-radius:5px;border:0px;color:#fff">卖出</button>
	</form>
		<table class="jyzx_list" style="margin-top:20px;margin-bottom:80px;border-collapse:collapse;table-layout: fixed">
			<thead>
			<tr style="width:100%;">
				<th style="padding:10px 0">昵称</th>
				<th style="padding:10px 0">等级</th>
				<th style="padding:10px 0;width:20%">GEC</th>
				<th style="padding:10px 0;">总价($)</th>
				<th style="padding:10px 0">状态</th>
			</tr>
			</thead>
			<tbody>
			<foreach name="lists" item="v">
				<tr style="margin-bottom:100px">
					<td class="name" style="padding:10px 0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;">{$v.p_name}</td>
					<td class="range iconfont" style="padding:10px 0;text-align:center;font-size:12px">
						<if condition = "$v.p_level eq 0">未激活</if>
						<if condition = "$v.p_level eq 1">GEC矿工</if>
						<if condition = "$v.p_level eq 2">公会会长</if>
						<if condition = "$v.p_level eq 3">创业大使</if>
						<if condition = "$v.p_level eq 4">环保大使</if>
						<if condition = "$v.p_level eq 5">国际大使</if>
						


					</td>
					<td class="lkMoney" style="padding:10px 0;text-align:center;">{$v.lkb}</td>
					<td class="money" style="padding:10px 0;text-align:center;">{$v.jb}</td>
					<if condition = "$v.zt eq 0">
						<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
							<button style="background-color:#05B6A3;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" class="btnsc">等待中</button>
						</td>
					</if>
					<if condition = "$v.zt eq 1">
						<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
							<button style="background-color:#666;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" >交易中</button>
						</td>
					</if>
					<if condition = "$v.zt eq 2">
						<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="{$v.id}">
							<button style="background-color:#05B6A3;width: 100%;height: 90% ;border: 0px;border-radius: 5px;color: #FFFFFF;cursor: pointer;" class="wancheng">交易完成</button>
						</td>
					</if>
				</tr>
			</foreach>
			<!-- <tr>
				<td style="padding:10px 0;text-align:center;">三九</td>
				<td style="padding:10px 0;text-align:center;">V3</td>
				<td style="padding:10px 0;text-align:center;">100.0001</td>
				<td style="padding:10px 0;text-align:center;">100.00</td>
				<td style="padding:5px 0;text-align:center;"><input class="ppid" type="hidden" value="2"><button class="btnchushou" style="background-color:#E64340;width: 100%;height: 100% ;border: 0px;border-radius: 5px;;color: #FFFFFF;cursor: pointer;">出售</button></td>
			</tr> -->
			</tbody>
		</table>
	</div>
<!--底部开始-->
<style>
	.footer ul li{
		width: 25%;
	}
</style>
		<div class="footer">
      <ul>
        <li><a href="/index.php/Shop/Index/" class="block"><i class="iconfont">&#xe604;</i>矿机商城</a></li>
		<li><a href="/index.php/Home/Info/mykuangche/" class="block"><i class="iconfont">&#xe601;</i>我的矿机</a></li>
		<li><a href="/index.php/Home/Info/Index/" class="block"><i class="iconfont">&#xe645;</i>交易中心</a></li>
        <li><a href="/index.php/Home/Index/Index/" class="block"><i class="iconfont">&#xe684;</i>个人中心</a></li>
    </ul>
</div>
	
	
	
	
	
	   <script src="__PUBLIC__/user2/js/jquery.dataTables.min.js"></script>
<script src="__PUBLIC__/user2/js/dataTables.bootstrap.min.js"></script>
<script src="__PUBLIC__/user2/js/jQuery-2.1.4.min.js"></script>
<script src="__PUBLIC__/web/js/echarts.min.js"></script>
<script src="__PUBLIC__/chart/mychart.js"></script>
<script src="__PUBLIC__/user2/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/user2/js/morris.min.js"></script>
<script src="__PUBLIC__/user2/js/raphael-min.js"></script>
	<!--底部结束-->
	<script src="__PUBLIC__/web/js/jquery-weui.min.js"></script>
	<script>
		function showhidediv(id) {
			console.log(id);
			var qiugou = document.getElementById("qiugou");
			var zhengzai = document.getElementById("chushou");
			var qiugoubg = document.getElementById("qiugou_list");
			var zhengzaibg = document.getElementById('chushou_list');
			if (id == "qiugou") {
				zhengzai.style.display = 'none';
				qiugou.style.display = 'block';
				qiugoubg.style.backgroundColor = "#05B6A3"
				qiugoubg.style.color = "#fff"
				zhengzaibg.style.backgroundColor = "#fff";
				zhengzaibg.style.color = "#000";
			}else if(id=='chushou'){
				zhengzai.style.display = 'block';
				qiugou.style.display = 'none';
				qiugoubg.style.backgroundColor = "#fff";
				qiugoubg.style.color = "#000";
				zhengzaibg.style.backgroundColor = "#05B6A3";
				zhengzaibg.style.color = "#fff";
			}
		}
	</script>
	
	
	
<if condition="$xgcs eq 0">
<script>
	$.alert("请绑定个人收款资料",function(){
		window.location.href='/index.php/Home/Info/myziliao/';
	});
	
</script>
</if>

	
	
	
<script>

    $(function(){
        var s='<div id="popUpBox" style="position:absolute;top:30%;width:100%;height:100%;display:none;background-color:#DDD">'+
            '<div style="margin:0 auto;width: 90%;height:150px;background-color: #fff;padding:15px 0 10px;border-radius: 10px">'+
            '<div style="text-align:center;font-size:1.2em;margin-top:15px;">是否确认提交？</div><input class="opid" type="hidden" value="" />'+
            '<div style="text-align:center;margin-top:35px;"><button style="font-size:1.2em;padding:5px 10px;background-color:#fff;border-radius: 5px;border: 0px;color:green"  id="confirmBtn">确认</button>&nbsp;&nbsp;<button style="padding:5px 10px;font-size:1.2em;border: 0px;background-color:#fff;border-radius: 5px" id="confirmBtnFalse">取消</button></div>'+
            '</div>'+
            '</div>';
        $("body").append(s);
    })


function btnchushou (obj) {
    	var huilv=$(obj).parent().parent().find(".money").html();
        $("#popUpBox").find(".opid").val($(obj).parent().find(".ppid").val());
        $.ajax({
            url:"{:U('/Home/Info/huilv')}",
            type:"get",
            data:{id:$("#UpBox").find(".opid").val(),huilv:huilv},
            dataType:"json",
            success:function(data){
                console.log(data);
                $.confirm("USD："+huilv+"<br>"+"RMB："+data.rmb+"<br>"+"BTC："+data.btc,"确定提交？",function(){
                    $.ajax({
                        url:"{:U('/Home/Info/chushou')}",
                        type:"get",
                        data:{id:$("#popUpBox").find(".opid").val()},
                        dataType:"json",
                        success:function(data){
                            console.log(data);
                            if(data.status==1){
                                $.alert(data.msg,function(){
                                    location.href="/index.php/Home/Info/myjiaoyi";
                                });
                            }else{
                                $.alert(data.msg,function(){
                                    location.href=data.link;
                                })
                            }
                        },
                        error:function(){
                            $.alert("网络错误请重试");
                        }
                    })

                })

            },
            error:function(){
                $.alert("网络错误请重试");
            }
        })
    }
</script>


<!--价格走势图开始-->
<script type="text/javascript">
    //<!-- 买入 -->
    $(function(){
        $("#mmm").bind("click",function(){
            var price=$("#mmp").val();
            var sum=/^[1-9]*[1-9][0-9]*$/;
            if($("#gmsl").val()==''){
				$.alert("请输入数量");
				return false;
			}
			if(sum.test($("#gmsl").val())){
			}else{
				$.alert("第一个数字不能为0");
				return false;
			}
            if(price==""){
                $.alert("请输入价格");
                return false;
            }
            if(!isNaN(price)){
            }else{
                $.alert("请输入数字");
                return false;
            }

            $.showLoading("正在提交");
            $.ajax({
                url:"/index.php/Home/Info/myjiaoyis",
                type:"post",
                data:$(".mmform").serialize(),
                dataType:"json",
                success:function(data){
                    if(data.status==1){
                        $.alert(data.info,function(){
                            location.href="/index.php/Home/Info/index/";
                        })
                    }else{
                        $.alert(data.info,function(){
                            location.href=data.link;
                        })
                    }
                },
                error:function(){
                    $.alert("网络错误");
                },
                complete:function(){
                    $.hideLoading();
                }
            })
        })
    })
    //<!-- 卖出 -->
    $(function(){
        $("#nnn").bind("click",function(){
            var price=$("#mcpic").val();
            var sum=/^[1-9]*[1-9][0-9]*$/;
            if($("#mcsl").val()==''){
				$.alert("请输入数量");
				return false;
			}
			if(sum.test($("#mcsl").val())){
			}else{
				$.alert("第一个数字不能为0");
				return false;
			}
            console.log(price);
            if(price==""){
                $.alert("请输入价格");
                return false;
            }
            if(!isNaN(price)){
            }else{
                $.alert("请输入数字");
                return false;
            }


            $.showLoading("正在提交");

            $.ajax({
                url:"/index.php/Home/Info/cslkb",
                type:"post",
                data:$(".nnform").serialize(),
                dataType:"json",
                success:function(data){
                    if(data.status==1){
                        $.alert(data.info,function(){
                            location.href="/index.php/Home/Info/index/";
                        })
                    }else{
                        $.alert(data.info,function(){
                            location.href=data.link;
                        })
                    }
                },error:function(){
                    $.alert("单价错误");
                },complete:function(){
                    $.hideLoading();
                }
            })

        })
    })






    $.ajax({
        url:"{:U('/Home/Ajax/getgp')}",
        type:"post",
        data:null,
        dataType:"json",
        success:function(data){
            chart.oldData=data;
            start(chart);
        },error:function(){
            console.log('没有获取到数据');
        }
    })
    //配置信息
    function start(chart){
        chart.deploy={
            //配置导航信息
            nav:{
                //导航容器的id 默认为chartNav
                navId:"chartNav",
                //设置导航信息
                data:[
                    {
                        title:"分时线",
                        //每条数据额间隔时间 单位为妙
                        interval:"60",
                        //按钮图标
                        icon:"",
                        //按钮class类 需要至少有一个active
                        class:"active",
                        //图标的类型0为折线图,1为kline线图  candlestick
                        type:0,
                        //显示数据的条数 不存在的话为无穷大 0为不显示,-1为无穷大
                        num:1440
                    }
                ]
            }
        };
        chart.start();
    }
    $("#mynav a").bind("click",function(){
        $("#mynav a").removeClass("active");
        $(this).addClass("active");
    })
    $("#mynav a").eq(0).bind("click",function(){
        $.ajax({
            url:"{:U('/Home/Ajax/getgp')}",
            type:"post",
            data:null,
            dataType:"json",
            success:function(data){
                chart.oldData=data;
                start(chart);
            },error:function(){
                console.log('没有获取到数据');
            }
        })
    })
    var cht = chart.mychart;
    var option = chart.option;
	
    $("#mynav a").eq(1).bind("click",function(){
        $.ajax({
            url:"{:U('/Home/Ajax/getgps')}",
            type:"post",
            data:null,
            dataType:"json",
            success:function(data){
                option.series.type='candlestick';
                option.tooltip.formatter=function(data){
                    return "时间:"+data[0].name+"<br>"+
                        "开盘"+data[0].data[0]+"<br>"+
                        "收盘"+data[0].data[1]+"<br>"+
                        "最低"+data[0].data[2]+"<br>"+
                        "最高"+data[0].data[3]+"<br>";
                }
                var time=[];
                var dt=[];
                for(var key in data){
                    var tt=new Date(data[key].date*1000);
                    var mm=tt.getMonth()+1;
                    var dd=tt.getDate();
                    time.push(mm+"月"+dd+"日");
                    dt[key]=[];
                    dt[key].push(data[key].jinkai);
                    dt[key].push(data[key].zuoshou);
                    dt[key].push(data[key].jrzd);
                    dt[key].push(data[key].jrzg);
                }
                option.xAxis.data=time;
                option.series.data=dt;
                cht.setOption(option);
            },error:function(){
                console.log('没有获取到数据');
            }
        })
    })
</script>
<!--价格走势图结束-->

	
<script>
    $(function(){
        var s='<div id="UpBox" style="position:absolute;top:30%;width:100%;height:100%;display:none;background-color:#DDD">'+
            '<div style="margin:0 auto;width: 90%;height:150px;background-color: #fff;padding:15px 0 10px;border-radius: 10px">'+
            '<div style="text-align:center;font-size:1.2em;margin-top:15px;">是否确认提交？</div><input class="opid" type="hidden" value="" />'+
            '<div style="text-align:center;margin-top:35px;"><button style="font-size:1.2em;padding:5px 10px;background-color:#fff;border-radius: 5px;border: 0px;color:green"  id="firmBtn">确认</button>&nbsp;&nbsp;<button style="padding:5px 10px;font-size:1.2em;border: 0px;background-color:#fff;border-radius: 5px" id="confirmBtnFalse">取消</button></div>'+
            '</div>'+
            '</div>';
        $("body").append(s);
    })
    $(function(){



        $(".btnsc").bind("click",function(){



            var huilv=$(this).parent().parent().find(".money").html();
            $("#popUpBox").find(".opid").val($(this).parent().find(".ppid").val());
            $.ajax({
                url:"{:U('/Home/Info/huilv')}",
                type:"get",
                data:{id:$("#UpBox").find(".opid").val(),huilv:huilv},
                dataType:"json",
                success:function(data){
                    console.log(data);
                    $.confirm("USD："+huilv+"<br>"+"RMB："+data.rmb+"<br>"+"BTC："+data.btc,"确定提交？",function(){
                        $.ajax({
                            url:"{:U('/Home/Info/lksc')}",
                            type:"get",
                            data:{id:$("#popUpBox").find(".opid").val()},
                            dataType:"json",
                            success:function(data){
                                console.log(data);
                                if(data.status==1){
                                    $.alert(data.msg,function(){
                                        location.href="/index.php/Home/Info/myjiaoyi";
                                    });
                                }else{
                                    $.alert(data.msg,function(){
                                        location.href=data.link;
                                    })
                                }
                            },
                            error:function(){
                                $.alert("网络错误请重试");
                            }
                        })

                    })

                },
                error:function(){
                    $.alert("网络错误请重试");
                }
            })





        })




    })
</script>
	<!-- 汇率转换 -->
	<script>
    $(function(){
		$(".money").bind("click",function(){
			var huilv=$(this).html();
			$.ajax({
				url:"{:U('/index.php/Home/Info/huilv')}",
				type:"get",
				data:{id:$("#UpBox").find(".opid").val(),huilv:huilv},
				dataType:"json",
				success:function(data){
				console.log(data);
					$.modal({
                        title: data.name,
                        text: "美元："+huilv+"<br>"+"人民币："+data.rmb+"<br>"+"比特币："+data.btc,
                        buttons:[
                            { text: "确定", className: "default", onClick: function(){ } },
                        ]
                    })
				},
				error:function(){
					$.alert("网络错误请重试");
				}
			})
		})
		$("#firmBtnFalse").bind("click",function(){
			$("#UpBox").fadeOut();
		})
		})
</script><!--
<if condition="$_SESSION['secpwd'] eq ''">
<script>
$(function(){
$.prompt("请输入安全密码","",function(){
   $.ajax({
   url:"{:U('/index.php/Home/Info/erjimima')}",
   type:"get",
   data:{pwd:$("#weui-prompt-input").val()},
   dataType:"json",
   success:function(data){
   if(data.status==1){
   $.alert(data.msg);
   }else{
   $.alert(data.msg,function(){
   location.href=location.href;
   });
   }
   },error:function(){
   $.alert("网络错误",function(){
   history.back(-1);
   });
   }
   })
},function(){
history.back(-1);
},1)
})
</script>
</if>-->
</body>
</html>